const layout = () => ({ component: import(pageURL + 'layout/index.js') });

const redirect = () => ({ component: import(pageURL + 'redirect/index.js') });
const loginPage = () => ({ component: import(pageURL + 'view/Login/Login.vue') });

// 首页
const Home = () => ({ component: import(pageURL + 'view/Home/Home.vue') });
//BDMS
const TestProject = () => ({ component: import(pageURL + 'view/Project/TestProject.vue') });
const TestTask = () => ({ component: import(pageURL + 'view/Project/TestTask.vue') });
const TaskDetails = () => ({ component: import(pageURL + 'view/Project/TaskDetails.vue') });
const Customer = () => ({ component: import(pageURL + 'view/Project/Customer.vue') });

const DaUser = () => ({ component: import(pageURL + 'view/Base/DaUser.vue') });
const OpticalPath = () => ({ component: import(pageURL + 'view/Base/OpticalPath.vue') });
const BaseCarryDevice = () => ({ component: import(pageURL + 'view/Base/BaseCarryDevice.vue') });
const BaseEnergyDistribution = () => ({ component: import(pageURL + 'view/Base/BaseEnergyDistribution.vue') });
const RoleDepartment = () => ({ component: import(pageURL + 'view/Base/RoleDepartment.vue') });
const SupplierDepartment = () => ({ component: import(pageURL + 'view/Base/SupplierDepartment.vue') });


const ProductData = () => ({ component: import(pageURL + 'view/PrjData/ProductData.vue') });
const TestFault = () => ({ component: import(pageURL + 'view/PrjData/TestFault.vue') });

//const TemplateMgr = () => ({ component: import(pageURL + 'view/DataManages/TemplateMgr.vue') });
//const ConManageImport = () => ({ component: import(pageURL + 'view/DataManages/ConManageImport.vue') });
const DataExport = () => ({ component: import(pageURL + 'view/DataManages/DataExport.vue') });
const DataImport = () => ({ component: import(pageURL + 'view/DataManages/DataImport.vue') });

const Visualization = () => ({ component: import(pageURL + 'view/Visual/Visualization.vue') });
const VisualMap = () => ({ component: import(pageURL + 'view/Visual/VisualMap.vue') });

const routeData = {
	// mode: 'history',
	scrollBehavior: () => ({ y: 0 }),
	routes: [
		{ path: '/redirect', component: layout, hidden: true,
			children: [
				{ path: '/redirect/:path(.*)', component: redirect }
			]
		},
		{ path: '/login', name: 'login', component: loginPage, meta: { title: '登录' } },
		{
			path: '/', name: 'frame', component: appframe, meta: {},
			children: [
				
				{ path: '/', component: layout, redirect: '/Home', meta: { title: '首页' },
					children: [
						{ path: '/Home', name: 'Home', component: Home, meta: { title: '首页', affix: true } }
					]
				},
				{ path: '/Visual/VisualMap', name: 'VisualMap', component: VisualMap, meta: { title: '保障资源态势图' } }, 
				{
					path: '/Visual', name: 'Visual', redirect: '/Visual/Visualization', component: layout, meta: { title: '保障资源态势图' },
					children: [
						{ path: '/Visual/Visualization', name: 'Visualization', component: Visualization, meta: { title: '保障资源态势图' } }
					]
				},
				{
					path: '/Project', name: 'Project', redirect: '/Project/TestProject', component: layout, meta: { title: '试验项目' },
					children: [
						{ path: '/Project/Customer', name: 'Customer', component: Customer, meta: { title: '客户管理' } },
						{ path: '/Project/TestProject', name: 'TestProject', component: TestProject, meta: { title: '试验项目管理' } },
						{ path: '/Project/TestTask', name: 'TestTask', component: TestTask, meta: { title: '试验任务管理' } },
					]
				},
				{ path: '/Project/TaskDetails', name: 'TaskDetails', component: TaskDetails, meta: { title: '试验任务详情' } },
				{
					path: '/Base', name: 'Base', redirect: '/Base/DaUser', component: layout, meta: { title: '基础数据管理' },
					children: [
						{ path: '/Base/DaUser', name: 'DaUser', component: DaUser, meta: { title: '人员管理' } },
						{ path: '/Base/OpticalPath', name: 'OpticalPath', component: OpticalPath, meta: { title: '光路配置' } },
						{ path: '/Base/BaseCarryDevice', name: 'BaseCarryDevice', component: BaseCarryDevice, meta: { title: '搭载设备配置' } },
						{ path: '/Base/BaseEnergyDistribution', name: 'BaseEnergyDistribution', component: BaseEnergyDistribution, meta: { title: '能量分布配置' } },
						
						{ path: '/Base/RoleDepartment', name: 'RoleDepartment', component: RoleDepartment, meta: { title: '角色管理' } },
						{ path: '/Base/SupplierDepartment', name: 'SupplierDepartment', component: SupplierDepartment, meta: { title: '厂商管理' } },
					]
				},
				
				{
					path: '/PrjData', name: 'PrjData', redirect: '/PrjData/ProductData', component: layout, meta: { title: '试验数据管理' },
					children: [
						{ path: '/PrjData/ProductData', name: 'ProductData', component: ProductData, meta: { title: '产品数据管理' } },
						//{ path: '/PrjData/DataImport', name: 'DataImport', component: DataImport, meta: { title: '试验数据导入' } },
						{ path: '/PrjData/TestFault', name: 'TestFault', component: TestFault, meta: { title: '试验故障管理' } },

					]
				},
				{
					path: '/DataManages', name: 'DataManages', redirect: '/DataManages/TemplateMgr', component: layout, meta: { title: '数据包管理' },
					children: [
						//{ path: '/DataManages/TemplateMgr', name: 'TemplateMgr', component: TemplateMgr, meta: { title: '模板导出管理' } },
						//{ path: '/DataManages/ConManageImport', name: 'ConManageImport', component: ConManageImport, meta: { title: '填报数据导入' } },
						{ path: '/DataManages/DataImport', name: 'DataImport', component: DataImport, meta: { title: '数据包导入' } },
						{ path: '/DataManages/DataExport', name: 'DataExport', component: DataExport, meta: { title: '数据包导出' } },

					]
				},
				
			]
		}
	]
};